package com.da.javatest.leetCode;

/**
 * @author chenlida
 * @date 2019/1/11 14:45
 * @description
 */
public class Code283 {
    public void moveZeroes(int[] nums) {
        int l = nums.length;
        for (int i = 0; i < l; i++) {
            if (nums[i] == 0) {
                for (int j = i; j < l - 1; j++) {
                    int temp = nums[j];
                    nums[j] = nums[j + 1];
                    nums[j + 1] = temp;
                }
                l--;
                i--;
            }
        }
    }
}
